//
//  ViewController.m
//  YTK_TTest
//
//  Created by admin on 2017/8/17.
//  Copyright © 2017年 clOudbb. All rights reserved.
//

#import "ViewController.h"
#import "FirstApi.h"
#import <AFNetworking.h>
#import "YTKNetworkAgent+ContentType.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    [[FirstApi new] startWithCompletionBlockWithSuccess:^(__kindof YTKBaseRequest * _Nonnull request) {
        NSDictionary *data = [NSJSONSerialization JSONObjectWithData:request.responseData options:NSJSONReadingMutableContainers error:nil];
        NSLog(@"%@", data);
    } failure:^(__kindof YTKBaseRequest * _Nonnull request) {
        
    }];
    
    [[SecondApi new] startWithCompletionBlockWithSuccess:^(__kindof YTKBaseRequest * _Nonnull request) {
        NSLog(@"%@", request.responseJSONObject);
    } failure:^(__kindof YTKBaseRequest * _Nonnull request) {
        
    }];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
